1. Field of the Invention
The solution according to one or more embodiments generally relates to electronic devices. More specifically, such solution relates to the programming of electronic devices.
2. Discussion of the Related Art
Electronic devices (e.g., integrated electronic devices) may be used in complex electronic systems for carrying out specific functionalities thereof. For such purpose, electronic devices present within an electronic system should be able to interact with each other; for example, in a typical electronic system, often an electronic device having control functions (such as a microcontroller) should interface with different peripheral electronic devices (e.g., memories, converters, sensors, and the like) for performing certain operations thereon.
In order to allow electronic devices within the same electronic system to communicate with each other, typically each one of such electronic devices is connected to a set of shared lines, called a bus, along which data, in the form of binary digits (or bits), and/or other electrical signals are exchanged.
In order to ensure that the communication among the electronic devices occurs correctly, it is necessary to establish a set of communication rules defined by a corresponding communication protocol.
For example, a widely used communication protocol, called I2C (“Inter Integrated Circuit”), allows communication among different electronic devices connected to each other through a same serial bus with two bi-directional transmission lines, i.e. a line carrying data (or data line) and a line carrying a synchronization signal (or clock line). Such I2C protocol also provides that there is at least one electronic device acting as a master able to request a communication towards one or more slave electronic devices addressed by it.
Therefore, it is important that each slave electronic device connected to the same bus is uniquely identifiable by a corresponding address. In particular, when a master electronic device wants to start a communication, it provides, through the data line, the address of the slave electronic device with which it wants to communicate to all the slave electronic devices connected to the same bus; the latter ones receive the address (through a corresponding communication interface, called I2C interface) and, according to a value thereof, enable or not the communication of the corresponding slave electronic device with the master electronic device.
In general, the address of the slave electronic device is defined by a string of bits. The address of the slave electronic device is usually programmed in field (so as to allow producing slave electronic devices equal to each other, which are programmed differently). For such purpose, the slave electronic device is provided with N programming pins, each one of which is connected to a ground line or to a supply line, for setting a corresponding bit of the address to the logical value 0 or 1, respectively. For addressing a number N of slave electronic devices, it is necessary to use an address with P=INT[log2N] bits, and hence an equal number of programming pins.
Although in principle the number of slave electronic devices connectable to the same bus may be relatively large, and depending substantially on bus parameters (e.g., capacity and speed of the same), typically such number is limited by the number programming pins that, consistently with size and functionality of the slave electronic devices, may be effectively used for programming the address.
For example, a relatively common version of the I2C protocol uses a 7-bit address; the 7 bits of the address of each slave electronic device are logically divided into two packets of bits, a packet including bits fixed by a manufacturer of the slave electronic device (most significant bits), and another packet including variable bits (least significant bits) actually programmed through the respective programming pins. For example, some recent versions of the I2C protocol provide that, among the seven bits of the address, the most significant bits are the first five, whereas the least significant bits are the remaining two; in this way, the two least significant bits, which may actually distinguish four different slave electronic devices connected to the same bus, involve the use of two programming pins for each slave electronic device.
However, in certain applications, the programming pins for each slave electronic device, although reduced in number, may involve a remarkable technological limit. In fact, with the more and more increasing trend toward miniaturization of the slave electronic devices, the latter are getting smaller and smaller, and thus they have a correspondingly limited total number of pins (given by the programming pins and by functional pins dedicated to functionalities of the electronic device). However, since the miniaturization of the slave electronic devices is usually contextual to an increase (or at least a non-reduction) of the functionalities of the same, the number of functional pins (affecting the functionalities of the slave electronic device) may not be reduced significantly; therefore, in such condition, the number of programming pins for each slave electronic device may have a significant impact in percentage on the total number of pins (so that even only two programming pins for each slave electronic device may be limiting).